home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / crashgui.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  3KB  |  62 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import wx
  5. if not hasattr(wx, 'WindowClass'):
  6.     wx.WindowClass = getattr(wx, '_Window', wx.Window)
  7.  
  8. if __name__ == '__main__':
  9.     import gettext
  10.     gettext.install('Digsby')
  11.  
  12. import wx.lib.sized_controls as sc
  13. CRASH_TITLE = _('Digsby Crash Report')
  14. CRASH_MSG = _('Digsby appears to have crashed.\n\nIf you can, please describe what you were doing before it crashed.')
  15. CRASH_SEND_BUTTON = _('&Send Crash Report')
  16.  
  17. class CrashDialog(sc.SizedDialog):
  18.     
  19.     def __init__(self, parent = None):
  20.         sc.SizedDialog.__init__(self, parent, -1, CRASH_TITLE, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
  21.         self.panel = CrashPanel(self)
  22.         s = self.Sizer = wx.BoxSizer(wx.VERTICAL)
  23.         s.Add(self.panel, 1, wx.EXPAND | wx.ALL, 8)
  24.         self.SetButtonSizer(self.CreateStdDialogButtonSizer(wx.OK | wx.CANCEL))
  25.         self.FindWindowById(wx.ID_OK).SetLabel(CRASH_SEND_BUTTON)
  26.         self.Fit()
  27.         self.SetMinSize((self.Size.width, 150))
  28.  
  29.     
  30.     def Description(self):
  31.         return self.panel.input.Value
  32.  
  33.     Description = property(Description)
  34.  
  35.  
  36. class CrashPanel(wx.Panel):
  37.     
  38.     def __init__(self, parent):
  39.         wx.Panel.__init__(self, parent)
  40.         self.construct()
  41.         self.layout()
  42.  
  43.     
  44.     def construct(self):
  45.         self.msg = wx.StaticText(self, -1, CRASH_MSG)
  46.         self.input = wx.TextCtrl(self, -1, size = (350, 200), style = wx.TE_MULTILINE)
  47.         wx.CallAfter(self.input.SetFocus)
  48.  
  49.     
  50.     def layout(self):
  51.         self.Sizer = wx.BoxSizer(wx.VERTICAL)
  52.         self.Sizer.AddMany([
  53.             (self.msg, 0, wx.EXPAND),
  54.             (10, 10),
  55.             (self.input, 1, wx.EXPAND)])
  56.  
  57.  
  58. if __name__ == '__main__':
  59.     a = wx.PySimpleApp()
  60.     CrashDialog().ShowModal()
  61.  
  62.